﻿@model EventSys.BussinesEntities.Participante 
@*IEnumerable<EventSys.BussinesEntities.Participante>*@

@*<p>
    @Html.ActionLink("Create New", "Create")
</p>*@

@*@{
    var ajaxoption = new AjaxOptions() {
        //Url = Url.Action("_Create"),
        OnSuccess = "OnSuccessLogeo"
    };
 }*@

<fieldset>
    <legend>Logeo</legend>
<div id="dialogLogeo" title="Logueo">
    
@using (Html.BeginForm())
{
    <fieldset>
        <legend></legend><b>Criterio:</b> 
        <input type="search" name="criterio" value="" placeholder="Ingrese CodUPN o Dni" id="criterio"/>
        <input type="submit" name="buscar" value="Buscar" class="k-button" id="buscar"/>
    </fieldset>

}
<table>

    <tr>
        <td>Codigo UPN:</td>
        <td> 
            @Html.TextBoxFor(model => model.CodigoUpn, new{style="width:80px", disabled="disabled"})
        </td>
    </tr>

    <tr>
        <td>DNI:</td>
        <td>
            @Html.TextBoxFor(model => model.DNI, new{style="width:80px", disabled="disabled"})
        </td>
    </tr>

    <tr>
        <td>Nombres:</td>
        <td>
            @Html.TextBoxFor(model => model.Nombres,new{disabled="disabled"})
        </td>
    </tr>

    <tr>
        <td>Apellidos:</td>
        <td>
            @Html.TextBoxFor(model => model.Apellidos,new{disabled="disabled"})
        </td>
    </tr>
    <tr>
        <td>Contraseña:</td>
        <td>
            @Html.TextBoxFor(model => model.Contraseña, new{id="pass"})
        </td>
    </tr>

</table>

    <div style="text-align:right">
        <hr style="color: #0056b2;" />
        @*<button id="iniciar"> Iniciar</button>*@
        <input type="submit" name="Iniciar" value="Iniciar" class="k-button" id="iniciar"/>
    </div>

    </div>
</fieldset>


<script type="text/javascript">
    //(document).ready
    $(function () {
        $("#buscar").click(function (e) {
            var criterio = $("#criterio").val();
            alert(criterio);
            var url = "@Url.Action("show", "info")/" + id + "?name=" + name;
            $("#result").load(url);
            
        });
    //});

    //$(document).ready(function () {
        $("#iniciar").click(function (e) {
            var pass = $("#pass").val();
            alert(pass);
            //var url = "@Url.Action("show", "info")/" + id + "?name=" + name;
            //$("#result").load(url);

        });
    });
     
</script>
